package Test_0518;

/**
 * Created with Intellij IDEA
 * Description:
 * User: 星辰
 * Dare: 2024-05-18
 * Time: 16:38
 */
public class Test_0518 {
    public static void main(String[] args){
        Dog dog = new Dog();
        dog.name="小白";
        dog.color="白色";
        dog.bark();
        dog.wag();
    }
}
   /*定义一个学生类*/
    class Students{
       public String name;
       public String gender;
       public int number;
       public double grade;
       public void require(){
           System.out.println(name+"按时上课");
       }
       public void med(){
           System.out.println(name+"完成作业");
       }
   }
    /*定义一个狗类*/
class Dog{//定义大驼峰
    public String name;
    public String color;
    public void bark() {
        System.out.println(name + ":汪汪汪~");
    }
        public void wag(){
            System.out.println(name+"摇尾巴");
        }
    }


